package com.lakeworks.service;

import com.lakeworks.common.core.domain.AjaxResult;
import com.lakeworks.common.domain.channel.ProductItem;
import com.lakeworks.domain.OprShipment;
import com.lakeworks.domain.vo.PackageQueryPara;
import com.lakeworks.domain.vo.ShipmentItem;

import java.util.List;

/**
 * 出厂单Service接口
 *
 * @author lake
 * @date 2023-02-08
 */
public interface IOprShipmentService {

    /**
     * 根据渠道出厂单号查询
     */
    OprShipment selectByChannelIdAndChShipmentNo(Long channelId, String chShipmentNo);

    /**
     * 查询出厂单
     *
     * @param id 出厂单主键
     * @return 出厂单
     */
    OprShipment selectOprShipmentById(Long id);

    /**
     * 查询出厂单列表
     *
     * @param oprShipment 出厂单
     * @return 出厂单集合
     */
    List<OprShipment> selectOprShipmentList(OprShipment oprShipment);


    List<OprShipment> selectShipmentList(OprShipment oprShipment);

    /**
     * 新增出厂单
     *
     * @param oprShipment 出厂单
     * @return 结果
     */
    int insertOprShipment(OprShipment oprShipment);

    /**
     * 修改出厂单
     *
     * @param oprShipment 出厂单
     * @return 结果
     */
    int updateOprShipment(OprShipment oprShipment);

    /**
     * 批量删除出厂单
     *
     * @param ids 需要删除的出厂单主键集合
     * @return 结果
     */
    int deleteOprShipmentByIds(String ids);

    /**
     * 删除出厂单信息
     *
     * @param id 出厂单主键
     * @return 结果
     */
    int deleteOprShipmentById(Long id);

    OprShipment selectByExpressNo(String expressNo);

    AjaxResult picking(List<Long> ShipmentIds);


    int outFactory(Long id);

    int countByChShipmentNo(String chShipmentNo);

    List<ProductItem> productItemById(Long id);

    int shipmentsCountByNoAndHour(String status, PackageQueryPara para);

    List<ShipmentItem> shipmentsByNoAndHour(String status, PackageQueryPara para);

    List<OprShipment> queryShipmentsByDistribution(OprShipment oprShipment);

}
